<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组解构</title>
  <!-- 数组结构是语法，将数组的单元值快速批量的赋值给一系列变量 -->
</head>

<body>
  <script>
    const arr = [100, 60, 80]
    const [a, b, c] = arr
    console.log(a);
    console.log(b);
    console.log(c);
    const pc = ['海尔', '联想', '戴尔']
    const [hr, lx, dr] = pc
    //pc.map(item => console.log(item))
    console.log(hr);
    console.log(lx);

    function getValue() {
      return [1, 2, 3]
    }
    const [max, min, avg] = getValue()
    console.log(max);
  </script>
</body>
</body>

</html>